#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>

int main()
{
    int n;
    scanf("%d", &n);
    getchar();
    int s[101];
    for (int i = 0; i < n; i++)
        scanf("%d", &s[i]);
    getchar();

    int max[101];
    memcpy(max, s, sizeof(s));
    while (1)
    {
        char w[10];
        int num[10];
        scanf("%s", w);
        if (w[0] == 'p')
        {
            for (int i = 0; i < n; i++)
                printf("%d ", s[i]);
            printf("\n");
            continue;
        }
        if (w[0] == 'e')
            break;
        for (int i = 0; i < 2; i++)
            scanf("%d", &num[i]);
        int x = num[0];
        if (x > n || x < 1)
        {
            printf("Failed\n");
            continue;
        }
        else
        {
            if (w[0] == 'c')
            {
                s[x - 1] += num[1];
                if (s[x - 1] <= max[x - 1])
                    printf("Success\n");
                else
                {
                    s[x - 1] -= num[1];
                    printf("Failed\n");
                }
            }
            if (w[0] == 'o')
            {
                s[x - 1] -= num[1];
                if (s[x - 1] >= 0)
                    printf("Success\n");
                else
                {
                    s[x - 1] += num[1];
                    printf("Failed\n");
                }
            }
            continue;
        }
    }
    return 0;
}